package com.ywl.exercise.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Basic;


@Table(name = "games", schema = "", catalog = "crazyguessimages")//对应的表名和数据库名
@Entity
public class GameEntity {
	private int gameid; //游戏编号
	private String loginid; //用户登录名
	private int scores; //游戏分数

	@Column(name = "gameid", nullable = false, insertable = true, updatable = true, length = 11, precision = 0)
    @Id //自增的id，主键
    @GeneratedValue
    public int getGameid() {
		return gameid;
	}
	public void setGameid(int gameid) {
		this.gameid = gameid;
	}
	
	@Column(name = "loginid", nullable = true, insertable = true, updatable = true, length = 30, precision = 0)
    @Basic
    public String getLoginid() {
		return loginid;
	}
	public void setLoginid(String loginid) {
		this.loginid = loginid;
	}
	
	@Column(name = "scores", nullable = true, insertable = true, updatable = true, length = 11, precision = 0)
	@Basic
	public int getScores() {
		return scores;
	}
	public void setScores(int scores) {
		this.scores = scores;
	}
	
	@Override
	public String toString() {
		return "Game [gameid=" + gameid + ", loginid=" + loginid + ", scores="
				+ scores + "]";
	}
}
